1. Field of the Invention
The present invention provides a method for a wireless access point for operating wireless local area network cards in a power-saving mode in a wireless communication system, and more particularly, a method for the wireless access point for operating the wireless local area network cards in the power-saving mode by controlling a traffic indication map of a beacon frame.
2. Description of the Prior Art
Recently, wireless communication has rapidly developed as digital and IC technologies change with each passing day. After a wireless communication protocol is already decided, a wireless local area network, or WLAN, scheme will mature. The WLAN has too many advantages to enumerate, but compared to a conventional LAN (local area network), the WLAN is more complicated.
For example, the IEEE 802.11 protocol includes a physical layer and a medium access control layer, or MAC layer. The physical layer is to provide each node in a network the ability to transmit data, while the MAC layer controls access between each station and the network. The MAC layer in IEEE 802.11 provides two protocols: distribution coordination function, or DCF, and point coordination function, or PCF. The PCF cooperates with the DCF operation via a polling method; that is, a point coordinator decides the timings of each station's transmission according to a polling list. The DCF controls the access according to a carrier sense multiple access with collision avoidance protocol, or CSMA/CA protocol. Basically, the DCF is to prevent the waiting stations from colliding with each other when competing for a channel, or a medium, when the channel changes from busy to idle state. With the DCF, the stations have to detect whether the medium is idle or not by power detection or virtual detection before transmitting a frame. If the medium is idle, each station is supposed to wait for a duration called the DCF inter-frame space, or DIFS, select a random time for initializing a backoff timer, and transmit a frame if the backoff timer counts to 0 without detecting another station's broadcast, otherwise defer the frame and perform the backoff procedure again. A contention window is an integer between 7 and 255, which is to decide a random waiting duration for each station. Only if the medium is idle does the backoff timer count down, otherwise the backoff timer freezes until the medium is idle for longer than a DIFS. If a collision happens or a transmitter does not receive a response from a receiver after a short inter-frame space, or SIFS, the transmitter re-transmits a frame for the receiver. In this situation, the values of the contention windows of the stations having collisions are doubled, and the stations perform the backoff procedures again until the frame is transmitted.
A WLAN is usually designed for mobile communication applications where power consumption is a problem. Therefore, the wireless communication protocol provides a power management scheme for implementing a power-saving operation. For example, in IEEE 802.11 protocol, each WLAN card, or station, can operate in two power modes: an active mode and a power-saving mode. When operating in the active mode, the WLAN card is under a full power condition, meaning that the WLAN card at full power condition can receive or transmit frames at any time. When in the power-saving mode, a wireless access point recognizes paths of WLAN cards operating in the power-saving mode, and stores data to be transmitted to the WLAN cards. Moreover, a WLAN card operating in the power-saving mode can be in a sleep state or an awake state. Most of the time, the WLAN card operating in power-saving mode is in the sleep state, meaning that the WLAN card does not perform any operation, but only enters the awake state for some intervals for listening to a beacon frame, and for receiving data stored in the wireless access point if necessary.
Generally, the wireless access point outputs beacon frames continuously, where a beacon frame is about 50 bytes long. A common frame header and a cyclic redundancy check occupy almost half of the beacon frame. The common frame header includes the MAC addresses of a source and a destination, as well as other information. The main content of the beacon frame is the data between the common frame header and the cyclic redundancy check, including: a beacon interval and a traffic indication map (TIM). If a WLAN card wants to enter the power-saving mode, the WLAN card has to transmit a power-saving request to the wireless access point. After the wireless access point receives the request and returns a response to the WLAN card, the WLAN card enters the power-saving mode. Once the WLAN card is in the power-saving mode, the WLAN card enters the awake state to listen to the beacon at every beacon interval, while the TIM in the beacon indicates if there is data for the WLAN card in the wireless access point. In short, the beacon interval indicates when the WLAN card operating in the power-saving mode should wake up to listen to the beacon, while the wireless access point uses the TIM for indicating whether there is any data to be transmitted to the WLAN card or not. After receiving the beacon frame, the WLAN card checks a partial virtual bitmap of the TIM, so as to determine if there is data to be received. If any such data exists, the WLAN card transmits a power-saving poll frame, or PS-Poll frame, to the wireless access point for informing the wireless access point that the WLAN card is ready to receive the data. As a result, the WLAN card changes states to operate in the awake state, which is the same as the active mode, and to contest or back off with other WLAN cards until the data is received.
Please refer to FIG. 1, which illustrates a schematic diagram of data flow between a prior art wireless access point and WLAN cards operating in the power-saving mode. Suppose that there are five WLAN cards 20, 22, 24, 26, and 28 operating in the power-saving mode within a transmission range of the wireless access point, and data 10, 12, 14, 16, and 18 stored in the wireless access point corresponding to the WLAN cards 20, 22, 24, 26, and 28 respectively. So, a partial virtual bitmap in a TIM of a beacon frame outputted from the wireless access point will indicate that WLAN cards 20, 22, 24, 26, and 28 need to receive the data 10, 12, 14, 16, and 18. The WLAN cards 20, 22, 24, 26, and 28 will then contest or back off with other WLAN cards until each one's data is received. However, until receiving data, the WLAN cards 20, 22, 24, 26, and 28 must remain in the awake state all the time. For example, in FIG. 1, before receiving the data 10, the WLAN card 20 must stay in the awake state, meaning that the WLAN card 20 consumes the same power as it uses in the active mode, until the data 10 is transmitted to the WLAN card 20 completely.
In short, when a WLAN card operating in the power-saving mode has data to be received, the prior art wireless access point sets a bit of the TIM corresponding to the WLAN card for indicating that the WLAN card should enter the awake state, so that before the data is received, the WLAN card should stay in the awake state. Moreover, because each WLAN card contests for a channel in a network, some WLAN cards may consume power all the time if they cannot get any channel in the network. For example, in FIG. 1, after the WLAN card 20 receives a first data segment of the data 10, the WLAN card 20 cannot grab any channels to receive a second data segment of the data 10 for four beacon intervals. However, during these four beacon intervals, the WLAN card 20 stays in the awake state, and so keeps consuming power.
Certainly, a WLAN card operating in the power-saving mode can conserve electric power. However, the WLAN card has to contest with other WLAN cards for a channel to receive data if need be, and until the data is received completely, the WLAN card must keep in the awake state, consuming the same power as in the active mode. Therefore, the WLAN card consumes very low power in the sleep state of the power-saving mode, but once data is to be received by the WLAN card, the WLAN card must stay in the awake state until the data is received. As a result, the WLAN card operating in the power-saving mode spends most of its time waiting to receive data, especially with a large data size.